<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../layui/v2.12.0/css/layui.css">
    <script src="../layui/v2.12.0/layui.js"></script>
</head>

<body>
    <button id="btn" type="button" class="layui-btn">默认按钮</button>
    <script>
        (function (window, document, $) {
            window.$ = $;
        })(window, document, layui.jquery);

        $('#btn').click(function () {
            alert('点击了');
        });
    </script>
</body>

</html>